<?php

abstract class mapper_prototype
{
	
	private $_libs;
	private $_errorMessage;
	private $_isError = false;
	private $_name;
	
	public function __construct($mapperName)
	{
		$this->SetName($mapperName);
		MozgLang::Load('mapper_' .$mapperName);
	}	
	
	protected function Libs()
	{
    	if (!$this->_libs)	$this->_libs = SysLoader::GetLibCollection(); 
    	return $this->_libs; 
	}	

    protected function GetName()
    {
    	return $this->_name;
    }
    
    protected function SetName($name)
    {
    	$this->_name = $name;
    }    
    
    public function GetErrorMessage()
    {
		return $this->_errorMessage;    	
    }
    
    protected function SetErrorMessage($message)
    {
    	$this->SetErrorStatus(true);
		$this->_errorMessage = $message; 
		return false;   	
    } 	
    
    protected function SetErrorStatus($flag)
    {
    	$this->_isError = $flag;
    }
    
    public function IsError()
    {
    	return $this->_isError;
    }
	
}